package frame;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JLabel;

public class PersonalinfoFrame{

    private JFrame frame;
    private JTextField textField;
    private JTextField textField_1;

    String s="";
    String name="";
    String password="";
    /**
     * Launch the application.
     */
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    PersonalinfoFrame window = new PersonalinfoFrame();
                    window.frame.setVisible(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }

    /**
     * Create the application.
     */
    public PersonalinfoFrame() {
        initialize();
    }

    public PersonalinfoFrame(String[] s){
        this.name=s[0];
        this.password=s[1];
        initialize();
    }
    /**
     * Initialize the contents of the frame.
     */
    private void initialize() {
        frame = new JFrame();
        frame.setBounds(100, 100, 450, 300);
        frame.setLocationRelativeTo(null); // Ĭ Ͼ     ʾ
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.getContentPane().setLayout(null);
        frame.setVisible(true);

        textField = new JTextField();
        textField.setBounds(221, 55, 86, 24);
        frame.getContentPane().add(textField);
        textField.setColumns(10);
        textField.setText(name);


        textField_1 = new JTextField();
        textField_1.setBounds(221, 107, 86, 24);
        frame.getContentPane().add(textField_1);
        textField_1.setColumns(10);
        textField_1.setText(password);

        JButton button = new JButton("\u786E\u5B9A");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                frame.setVisible(false);
            }
        });
        button.setBounds(155, 185, 113, 27);
        frame.getContentPane().add(button);

        JLabel label = new JLabel("\u7528\u6237\u540D\uFF1A");
        label.setBounds(107, 58, 72, 18);
        frame.getContentPane().add(label);

        JLabel label_1 = new JLabel("\u7528\u6237\u5BC6\u7801\uFF1A");
        label_1.setBounds(107, 110, 86, 18);
        frame.getContentPane().add(label_1);

    }
}